
// var wxUrl = 'http://456.sheyuan.com/sywapi';
// var wxUrls='http://456.sheyuan.com/sywmjapi';
// var wxUrl = 'http://192.168.1.108:8001'
// var wxUrls='http://192.168.1.108:8001'
var wxUrl = 'http://192.168.142.1:8001'
var wxUrls='http://192.168.142.1:8001'

/*var wxUrl = 'http://456.sheyuan.com/sywapi';*/

var token = '';
var userToken = '';
var province = '北京';
var city = '北京';
var district = '东城区';
var longitude = 116.403963;
var latitude = 39.915119;

var app = 'http://192.168.142.1:8080/syw_dz_wx';
var self_base_path = 'http://192.168.142.1:8080/syw_dz_wx';
// var app = 'http://192.168.1.108:8080/syw_dz_wx';
// var self_base_path = 'http://192.168.1.108:8080/syw_dz_wx';

//初始化
$(function () {
    var version = 201703011300;
    require.config({
        waitSeconds: 60,
        urlArgs: 'version=' + version,
        paths: {
            'goSwiper': app + '/libs/swiper/swiper.min',
            'jquery': app + '/libs/jquery.min',
            'loading': app + '/libs/components/loading',
            'Uploader': app + '/libs/components/UploadComponent',
            'Input': app + '/libs/components/Input',
            'WebUploader': app + '/libs/webuploader.html5only',
            'wx-footer' : app + '/libs/components/footer'
        },
        shim: {
            'goSwiper':{
                exports: 'useSwiper'
            },
            'WebUploader': ['jquery']
        },
    });

    //获取token
    getToken();
	getUserToken();
    //获取地理位置
    getLocation();
    // 自动登录
    //获取url中的id参数
	/*var params = getUrlParams();
	var auth = params.auth?params.auth:"";
	if(auth && userToken == ''){
		vLoginClick();
	}*/
    //开启fastclick 解决移动端300ms延迟
	var attachFastClick = Origami.fastclick;
    attachFastClick(document.body);
});